#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

int main()
{
    char arr[10001];
    while (gets(arr) != NULL)
    {
        size_t n = strlen(arr);
        for (int i = n - 1; i >= 0; i--)
        {
            printf("%c", arr[i]);
        }
    }
    return 0;
}